<?php

namespace App\Http\Requests\Admin\activity;

use App\Http\Requests\Request;

class StoreRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'required|unique:activity',
            'identification' => 'required|unique:activity',
        ];
    }

    public function messages()
    {
        return [
            'name.required'=>'请填写活动页面名称',
            'name.unique'=>'该名称已存在',
            'identification.required'=>'请填写活动页标识',
            'identification.unique'  => '该活动页标识已存在',
          
        ];

    }
}
